﻿#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QGridLayout>


QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
class QAudioRecorder;
class PadButton;
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

    void start();
    void calInterval();

private slots:
    void on_actionRecord_triggered();

    void on_actionStop_triggered();

    void on_actionStart_triggered();

    void on_pushButton_clicked();

private:
    Ui::MainWindow *ui;
    QGridLayout* _layout{Q_NULLPTR};
    QAudioRecorder* _recorder{Q_NULLPTR};
    QList<PadButton*> _pads;
    QTimer* _timer{Q_NULLPTR};

    QTimer* _recordTimer{Q_NULLPTR};
    int _cnt=0;
};
#endif // MAINWINDOW_H
